<?php
namespace app\admin\controller;
use think\Controller;
use think\Cookie;
use think\Cache;

class Index extends Common
{
    public function index()
    {
       //获取用户ID
       $id = Cookie::get('id');
       // echo $id;
       //从缓存中拿到'user_'.$id
       $info = Cache::get('user_'.$id);
       $this->assign('menus',$info['menus']);
       return $this->fetch();

    }
    public function welcome(){
       return $this->fetch();
    } 
}
